{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=72
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	i,n:longint;
	ans,kk:int64;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
ans:=-round(1e12);
for i:=1 to n do begin
	read(kk);
	ans:=max(ans,kk);
end;
write(ans);
end.